package com.info33.platform.system.dic.dto;

import com.fasterxml.jackson.annotation.JsonView;
import com.info33.platform.common.mvc.jsonview.property.JsonViewId;
import com.info33.platform.common.mvc.jsonview.property.JsonViewRemarks;
import com.info33.platform.common.mvc.jsonview.property.JsonViewSort;
import com.info33.platform.system.dic.entity.SysDic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * 系统 - 字典 v2
 *
 * @author nyj2one
 * @since 2022-11-23 11:08:41
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class SysDicDTO extends SysDic {

    private static final long serialVersionUID = 662450698642231494L;

    @JsonView({OpenList.class,
            OpenTree.class,
            PcListByMods.class})
    @NotEmpty(
            message = "租户 url 不能为空",
            groups = {OpenList.class,
                    OpenTree.class,
                    PcListByMods.class})
    @ApiModelProperty(value = "租户 url")
    private String tenantUrl;

    public interface PcPage {
    }

    public interface PcAdd extends JsonViewSort, JsonViewRemarks {
    }

    public interface PcEdit extends JsonViewId, JsonViewSort, JsonViewRemarks {
    }

    public interface OpenList {
    }

    public interface OpenTree {
    }

    public interface PcListByMods {
    }
}
